package demo2;

/**
 * DomWon
 * Created with Intellij IDEA.
 * Description:
 * User:WEI
 * Date:2023/3/22
 * Time:16:20
 */
import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws Exception {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            String className = scanner.next();
            Base obj = (Base) Class.forName(className).newInstance();
            System.out.println(getClassName(obj));
        }
    }

    public static String getClassName(Base obj) {

        //write your code here......
        return obj.toString();

    }

}

class Base {
    @Override
    public String toString() {
        return "Base";
    }
}

class Sub1 extends Base {
    @Override
    public String toString() {
        return "Sub1";
    }
}

class Sub2 extends Base {
    @Override
    public String toString() {
        return "Sub2";
    }
}
